[id].vue 678 B

123456789101112131415161718192021222324252627
  1. <template>
  2. <div>
  3. <LayoutCommonSection>
  4. <UiFormEdition :model="Cycle" go-back-route="/parameters/teaching">
  5. <template #default="{ entity }">
  6. <UiInputText
  7. v-if="entity !== null"
  8. v-model="entity.label"
  9. field="label"
  10. :rules="getAsserts('label')"
  11. />
  12. </template>
  13. </UiFormEdition>
  14. </LayoutCommonSection>
  15. </div>
  16. </template>
  17. <script setup lang="ts">
  18. import Cycle from '~/models/Education/Cycle'
  19. import {getAssertUtils} from "~/services/asserts/getAssertUtils";
  20. definePageMeta({
  21. name: 'cycle',
  22. })
  23. const getAsserts = (key) => getAssertUtils(Cycle.getAsserts(), key)
  24. </script>